package com.bjpowernode.boss.mvc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bjpowernode.boss.domain.UserPayInfo;
import com.bjpowernode.boss.mapper.UserPayInfoMapper;
import com.bjpowernode.boss.mvc.service.UserPayInfoService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 加载用户支付信息 业务实现类
 */
@Service
public class UserPayInfoServiceImpl extends ServiceImpl<UserPayInfoMapper, UserPayInfo> implements UserPayInfoService {

    @Resource
    private UserPayInfoMapper userPayInfoMapper;

    @Override
    public List<UserPayInfo> loadUserPayInfoData(String userNo) {
        return userPayInfoMapper.selectList(
                new LambdaQueryWrapper<UserPayInfo>()
                        .eq(UserPayInfo::getUserNo, userNo)
                        .orderByDesc(UserPayInfo::getEditTime));
    }
}
